#include<stdio.h>
int main(int argc,const char * argv[])
{

	int g, b, s;
	int count=0;
	for (g = 1; g < 5; g++)
	{
		for (b = 1; b < 5; b++)
		{
			for (s = 1; s< 5; s++)
			{
				if (g!= b&&b!= s&&g!= s)
				{
					printf("%d%d%d\n",g,b,s);
					count++;
				}
			}
		}
	}
	printf("count=%d\n", count);
	return 0;
}